#include "push_rod_ctr.h"
#include "bsp_can1.h"

void Set_Push_Rod_Speed(uint8_t eun,int16_t sp)
{
    uint8_t cantxbuf[8] = {0XFA,PUSH_ROD_ONE,0};
    if(eun == PUSH_ROD_ONE){
        cantxbuf[1] = PUSH_ROD_ONE;
        cantxbuf[3] = sp>>8&0XFF;
        cantxbuf[2] = sp;
        CAN1_TX_PACKET(DRIVE_BOARD_ID,cantxbuf,8);
    }
    else if(eun == PUSH_ROD_TWO){
        cantxbuf[1] = PUSH_ROD_TWO;
        cantxbuf[3] = sp>>8&0XFF;
        cantxbuf[2] = sp;
        CAN1_TX_PACKET(DRIVE_BOARD_ID,cantxbuf,8);
    }
}

